""" 
激光传感器
Pin接线
    SIG --> GPIO15
    VCC --> 5V
    GND --> GND
"""

from machine import Pin
import time

LaserPinNum = 15

if __name__ == "__main__":
    laser_pin = Pin(LaserPinNum, Pin.OUT)
    laser_pin.value(0)

    while True:
        # 打开激光
        laser_pin.value(1)
        time.sleep(2)

        # 关闭激光
        laser_pin.value(0)
        time.sleep(2)
